package com.us.usws.common;

import net.iwsh.core.common.GlobalConfig;

/**
 * Site constants
 */
public class EpServerConstants {

	/*----------------------- configuration constants -----------------------------*/

	//page constants

	//web service constants
	public static final String WS_HEADER_BOXSN_NAME, WS_HEADER_TOKEN_NAME;
	public static final int EP_HEARTBEAT_IMIT;
	public static final String MEETING_SERVER_HOST;

	static {
		//debug and auto login
		WS_HEADER_BOXSN_NAME = GlobalConfig.getString("WSParams/HeaderBoxsnName", "userid");
		WS_HEADER_TOKEN_NAME = GlobalConfig.getString("WSParams/HeaderTokenName", "access-token");
		EP_HEARTBEAT_IMIT = GlobalConfig.getInt("WSParams/EPHeartBeatDurationLimitMimutes", 1);
		MEETING_SERVER_HOST = GlobalConfig.getString("Local/MeetingServerHost");
	}

	/*----------------------- immutable constants -----------------------------*/

	public static final String SESSION_KEY_EP_TOKEN_USER = "ep_token_user";

	/**
	 * constants for ep server
	 */
	public static final String EP_DB_CONN = "epconn";
	public static final byte EP_CODE_LOGIN_SUCCESS = 100;
	public static final byte EP_CODE_LOGIN_FAIL_NEED_LOGIN = 100;
	public static final byte EP_CODE_LOGIN_FAIL_EMPTY_HEADER = 103;
	public static final byte EP_CODE_LOGIN_FAIL_INVALID_PASSWD = 103;
	public static final byte EP_CODE_LOGIN_FAIL_NO_RECORDS_OF_EP = 104;
	public static final byte EP_CODE_LOGIN_FAIL_HEARTBEAT_TIMEDOUT = 104;
	public static final byte EP_CODE_LOGOUT_FAIL = 103;

	/**
	 * msc info
	 */
	public static final int EP_MSC_INFO_ROLE_MVIDEO = 1;
	public static final int EP_MSC_INFO_ROLE_SVIDEO = 2;
	public static final int EP_MSC_INFO_ROLE_MWB = 3;
	public static final int EP_MSC_INFO_ROLE_SWB = 4;

	public static final String EP_WS_MEETING_SERVER_TYPE_VIDEO = "vv";
	public static final String EP_WS_MEETING_SERVER_TYPE_WHITE_BOARD = "wb";
	public static final String EP_WS_MEETING_SERVER_TYPE_WHITE_BOARD_FILE = "wf";

}
